package com.lightsh.body;

import org.jbox2d.dynamics.World;

import com.lightsh.gui.PhysicsScreen;

public class RectangleImpl extends Rectangle{
	protected final PhysicsScreen mParentScreen;
	
	/**
	 * 注意: 该类使用的单位为px
	 * @param screen	该body所属的screen
	 * @param world 世界
	 * @param x 中心坐标x
	 * @param y 中心坐标y
	 * @param halfWidth 宽度一半
	 * @param halfHeight 高度一半
	 * @param density 密度
	 * @param friction 摩擦力
	 * @param restitution 碰撞后恢复系数
	 */
	public RectangleImpl(PhysicsScreen screen, float x, float y, float halfWidth,
			float halfHeight, float density, float friction, float restitution){
		super(screen.getWorld(), screen.pxToMeter(x), screen.pxToMeter(y), screen.pxToMeter(halfWidth), screen.pxToMeter(halfHeight), density, friction, restitution);
		mParentScreen = screen;
	}
}
